package com.qingcheng.pojo.goods;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.RequiredArgsConstructor;

import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @ProjectName: qingchengcode
 * @ClassName: Brand
 * @Time: 2019/6/21
 * @Author: Janus
 * @Description:
 * @Experience:
 */
@Data  //toString   getter  setter
@NoArgsConstructor
@AllArgsConstructor
//@RequiredArgsConstructor
//Mybatis  -->  半ORM  O Object Java中对象  R Relation 关系  M Mapping  映射   +mapper =全ORM
@Table(name="tb_brand") //实体类和数据库中的tb_brand表对应，操作该实体类就相当于操作数据库中的tb_brand表
//Lombok
public class Brand  implements Serializable{
    @Id //声明该属性和数据库中主键
    private Integer id ;
    private String name;
    private String image;
    private String letter;
    private Integer seq;

    public static void main(String[] args) {
        Brand brand = new Brand();
        brand.setId(1);
        int i = brand.hashCode();
        String s = brand.toString();
        System.out.println(s);
        System.out.println(i);
        //String 里的  hashcode  会重复   非String对象的hashcode  不会
    }
}
